package com.ybkj.chat.module.main.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.ybkj.chat.R;
import com.ybkj.chat.base.BaseMvpFragment;
import com.ybkj.chat.module.mine.activity.CarActivity;
import com.ybkj.chat.module.mine.activity.MyDynamicActivity;
import com.ybkj.chat.module.mine.activity.PersonalInformationActivity;
import com.ybkj.chat.module.mine.activity.PurseActivity;
import com.ybkj.chat.module.mine.activity.SettingsActivity;
import com.ybkj.chat.module.mine.activity.VipCenterActivity;
import com.ybkj.chat.module.mine.activity.VisitorActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * 我的
 */
public class MineFragment extends BaseMvpFragment {

    @BindView(R.id.lnl_purse)
    LinearLayout lnlPurse;
    @BindView(R.id.lnl_vip)
    LinearLayout lnlVip;
    @BindView(R.id.lnl_qr_code)
    LinearLayout lnlQrCode;
    @BindView(R.id.lnl_car)
    LinearLayout lnlCar;
    Unbinder unbinder;

    @Override
    protected void injectPresenter() {


    }

    @Override
    protected void initView() {
    }

    @Override
    protected void initData() {

    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_mine;
    }

    @Override
    protected String getSimpleNme() {
        return null;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        unbinder = ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.lnl_purse, R.id.lnl_vip, R.id.lnl_qr_code, R.id.lnl_car,R.id.lnl_visitor,R.id.lnl_settings,R.id.rnl_information,R.id.lnl_my_dynamic})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.lnl_purse:
                getActivity().startActivity(new Intent(getActivity(), PurseActivity.class));
                break;
            case R.id.lnl_vip:
                getActivity().startActivity(new Intent(getActivity(), VipCenterActivity.class));
                break;
            case R.id.lnl_car:
                getActivity().startActivity(new Intent(getActivity(), CarActivity.class));
                break;
            case R.id.lnl_visitor:
                getActivity().startActivity(new Intent(getActivity(), VisitorActivity.class));
                break;
            case R.id.lnl_settings:
                getActivity().startActivity(new Intent(getActivity(), SettingsActivity.class));
                break;
            case R.id.rnl_information:
                getActivity().startActivity(new Intent(getActivity(), PersonalInformationActivity.class));
                break;
            case R.id.lnl_my_dynamic:
                getActivity().startActivity(new Intent(getActivity(), MyDynamicActivity.class));
                break;
        }
    }
}
